/**
 * 路由处理程序
 * @param { String } pathname url.parse().pathname
 */
function route(handle , pathname , response ,postData ){
	console.log('收到来自' + pathname + '的请求');
	if(typeof handle [pathname] == 'function' ) {
		handle[pathname](response) ;
	} else {
		console.log('对于<' + pathname +'>没有找到合适的路由');
		response.writeHead(404,{"Content-Type":"text/plain"});
        response.write("页面从地球上消失了~")
	}

}

exports.route = route ;